package com.sms.plateform.web.controller;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sms.plateform.common.util.JSONUtil;
import com.sms.plateform.common.util.Utils;
import com.sms.plateform.kernel.service.IGroupInfoService;

@Controller
public class GroupInfoController extends BaseController {
	@Autowired
	private IGroupInfoService groupInfoService;
	
	@RequestMapping("/userinfolist_ajax")
	public void ajaxListUserInfoHandel(HttpServletRequest request,HttpServletResponse response,ModelMap model) {
		Map<String, Object> param=new HashMap<String, Object>();
		param.put("subgid", Utils.trim(this.getUrlParam(request, "gid")));
		List<HashMap<String, Object>> listHashMap=this.groupInfoService.listUserGroupPriceInfo(param);
		param.put("dataList", listHashMap);
		try {
			response.getWriter().write(JSONUtil.map2json(param));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
